package com.xqboss.apps.domain.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xqboss.apps.domain.BaseTable;
import com.xqboss.apps.enums.market.MarketTypeEnum;
import com.xqboss.apps.enums.order.OrderTypeEnum;
import com.xqboss.apps.enums.order.RefundStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 订单子表
 * </p>
 *
 * @author lang.liu
 * @since 2021-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
//@Document(indexName = "order_item")
@ApiModel(value = "OrderItem对象", description = "订单子表")
public class OrderItem extends BaseTable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "订单主表ID")
    private Long orderMainId;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "订单类型")
    private OrderTypeEnum orderType;

    @ApiModelProperty(value = "市场类型")
    private MarketTypeEnum marketType;

    @ApiModelProperty(value = "商品主图url")
    private String skuImg;

    @ApiModelProperty(value = "spu_id")
    private Long spuId;

    @ApiModelProperty(value = "sku_id")
    private Long skuId;

    @ApiModelProperty(value = "组套sku编码id")
    private String combineSkuId;

    @ApiModelProperty(value = "商品名称")
    private String spuName;

    @ApiModelProperty(value = "商品数量")
    private Integer skuCnt;

    @ApiModelProperty(value = "下单单位，规格")
    private String skuSpec;

    @ApiModelProperty(value = "商品单价")
    private BigDecimal skuPrice;

    @ApiModelProperty(value = "商品成本价")
    private BigDecimal skuCost;

    @ApiModelProperty(value = "订单总金额（不扣除优惠和抵扣的金额，不包含运费）")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "应付金额（扣除优惠和抵扣后的金额，不包含运费）")
    private BigDecimal paymentAmount;

    @ApiModelProperty(value = "交易手续费")
    private BigDecimal transactionFee;

    @ApiModelProperty(value = "发行方名称")
    private String publishName;

}
